feat: pass changed boolean array to derived callbacks #6786
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows the callbacks to easily run complex update logic based on which store changed most recently.
Fixes #6777.
NOTE: I have based this PR on top of #6750 since #6750 also changes the function signature of the
derived
callback, and if achanged
array was added to the callback function signature and then #6750 was merged later, the signature would become(stores, set, changedArray, update)
which is much uglier than(stores, set, update, changedArray)
. That is also why this is a draft PR; once #6750 is either merged or rejected I'll convert this PR from a draft to a real PR (and also rebase it so there are no merge conflicts).Basing this PR on top of #6750 brings the unfortunate effect that it can be hard to see this PR's changes in isolation, so I've created rmunn#1 to see this PR's changes compared to the changes in #6750. Hopefully that makes things clear enough.
Before submitting the PR, please make sure you do the following
[feat]
,[fix]
,[chore]
, or[docs]
.Tests
npm test
and lint the project withnpm run lint